package cn.tedu.shoot;

import java.awt.image.BufferedImage;

public class Airplane extends FlyingObject implements EnemyScore{
    int speed;

    public Airplane(){
        super(48,50);
        speed = 2;
    }

    public void step (){
        y+=speed;
    }

    int index = 1;
    public BufferedImage getImage(){
        if(isLive()){
            return Images.airs[0];
        }else if (isDead()){
            BufferedImage img =Images.airs[index++];
            if(index == Images.airs.length){
                state = REMOVE;
            }
            return img;
        }
        return null;
    }

    public int  getScore(){
        return 1;
    }
}
